#include "startframe.h"
#include "ui_startframe.h"
#include"sourcemanage.h"

StartFrame::StartFrame(QWidget *parent) :
    QFrame(parent),
    ui(new Ui::StartFrame)
{
    ui->setupUi(this);
    this->setWindowFlags(Qt::Dialog|Qt::FramelessWindowHint);
    pMainFrame=NULL;

    QTimer::singleShot(10,this,SLOT(OnInit()));
    QTimer::singleShot(5000,this,SLOT(OnInitTimeout()));
}

StartFrame::~StartFrame()
{
    if(pMainFrame!=NULL) delete pMainFrame;
    delete ui;
}

void StartFrame::OnInit()
{
    SM;//
    pMainFrame=new MainFrame;
    pMainFrame->setWindowFlags(Qt::Window);
    pMainFrame->setAttribute(Qt::WA_ShowModal, true);
}
void StartFrame::OnInitTimeout()
{
    this->hide();
    pMainFrame->show();
}
